﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace TrailMapManager.Common
{
    public class BaseModule : BaseViewLogic
    {
        private string _title;
        public string Title
        {
            get { return _title; }
            set { _title = value; NotifyPropertyChanged("Title"); }
        }

        private FrameworkElement _content;
        public FrameworkElement Content
        {
            get { return _content; }
            set { _content = value; NotifyPropertyChanged("Content"); }
        }

        public BaseModule(FrameworkElement content, Type ViewLogicType)
        {
            Content = content;
            Content.DataContext = Activator.CreateInstance(ViewLogicType);
            this.IsBusy = (Content.DataContext as BaseViewLogic).IsBusy;
        }


    }
}
